using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._TopographicProductionTools._DataManagement._Topology
{
    /// <summary>
    /// <para>Export Topology</para>
    /// <para>Exports a topology from a geodatabase to an .xml file.</para>
    /// <para>将拓扑从地理数据库导出到 .xml 文件。</para>
    /// </summary>    
    [DisplayName("Export Topology")]
    public class ExportTopology : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public ExportTopology()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_topology">
        /// <para>Input Topology</para>
        /// <para>An existing topology in a geodatabase. All feature classes that participate in this topology will be listed in the output .xml file.</para>
        /// <para>地理数据库中的现有拓扑。参与此拓扑的所有要素类都将在输出.xml文件中列出。</para>
        /// </param>
        /// <param name="_location">
        /// <para>Topology XML Document Location</para>
        /// <para>The folder in which the .xml file will be written.</para>
        /// <para>将写入 .xml 文件的文件夹。</para>
        /// </param>
        /// <param name="_file_name">
        /// <para>Topology XML Document Name</para>
        /// <para>The name of the topology .xml file that will be created by the tool.</para>
        /// <para>该工具将创建的拓扑.xml文件的名称。</para>
        /// </param>
        public ExportTopology(object _topology, object _location, object _file_name)
        {
            this._topology = _topology;
            this._location = _location;
            this._file_name = _file_name;
        }
        public override string ToolboxName => "Topographic Production Tools";

        public override string ToolName => "Export Topology";

        public override string CallName => "topographic.ExportTopology";

        public override List<string> AcceptEnvironments => [];

        public override object[] ParameterInfo => [_topology, _location, _file_name, _out_file];

        /// <summary>
        /// <para>Input Topology</para>
        /// <para>An existing topology in a geodatabase. All feature classes that participate in this topology will be listed in the output .xml file.</para>
        /// <para>地理数据库中的现有拓扑。参与此拓扑的所有要素类都将在输出.xml文件中列出。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Topology")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _topology { get; set; }


        /// <summary>
        /// <para>Topology XML Document Location</para>
        /// <para>The folder in which the .xml file will be written.</para>
        /// <para>将写入 .xml 文件的文件夹。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Topology XML Document Location")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _location { get; set; }


        /// <summary>
        /// <para>Topology XML Document Name</para>
        /// <para>The name of the topology .xml file that will be created by the tool.</para>
        /// <para>该工具将创建的拓扑.xml文件的名称。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Topology XML Document Name")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _file_name { get; set; }


        /// <summary>
        /// <para>Output Topology XML Document</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Topology XML Document")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public object _out_file { get; set; }


        public ExportTopology SetEnv()
        {
            base.SetEnv();
            return this;
        }

    }

}